3.1.93 \(\int \frac {x (A+B x+C x^2+D x^3)}{(a+b x^2)^2} \, dx\)

Optimal. Leaf size=101 \[ -\frac {x \left (a \left (B-\frac {a D}{b}\right )-x (A b-a C)\right )}{2 a b \left (a+b x^2\right )}+\frac {(b B-3 a D) \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{2 \sqrt {a} b^{5/2}}+\frac {C \log \left (a+b x^2\right )}{2 b^2}+\frac {D x}{b^2} \]

________________________________________________________________________________________

Rubi [A]  time = 0.12, antiderivative size = 101, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.192, Rules used = {1804, 1810, 635, 205, 260} \begin {gather*} -\frac {x \left (a \left (B-\frac {a D}{b}\right )-x (A b-a C)\right )}{2 a b \left (a+b x^2\right )}+\frac {(b B-3 a D) \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{2 \sqrt {a} b^{5/2}}+\frac {C \log \left (a+b x^2\right )}{2 b^2}+\frac {D x}{b^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(x*(A + B*x + C*x^2 + D*x^3))/(a + b*x^2)^2,x]

[Out]

(D*x)/b^2 - (x*(a*(B - (a*D)/b) - (A*b - a*C)*x))/(2*a*b*(a + b*x^2)) + ((b*B - 3*a*D)*ArcTan[(Sqrt[b]*x)/Sqrt
[a]])/(2*Sqrt[a]*b^(5/2)) + (C*Log[a + b*x^2])/(2*b^2)

Rule 205

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]*ArcTan[x/Rt[a/b, 2]])/a, x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rule 260

Int[(x_)^(m_.)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Simp[Log[RemoveContent[a + b*x^n, x]]/(b*n), x] /; FreeQ
[{a, b, m, n}, x] && EqQ[m, n - 1]

Rule 635

Int[((d_) + (e_.)*(x_))/((a_) + (c_.)*(x_)^2), x_Symbol] :> Dist[d, Int[1/(a + c*x^2), x], x] + Dist[e, Int[x/
(a + c*x^2), x], x] /; FreeQ[{a, c, d, e}, x] &&  !NiceSqrtQ[-(a*c)]

Rule 1804

Int[(Pq_)*((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> With[{Q = PolynomialQuotient[Pq, a + b*x
^2, x], f = Coeff[PolynomialRemainder[Pq, a + b*x^2, x], x, 0], g = Coeff[PolynomialRemainder[Pq, a + b*x^2, x
], x, 1]}, Simp[((c*x)^m*(a + b*x^2)^(p + 1)*(a*g - b*f*x))/(2*a*b*(p + 1)), x] + Dist[c/(2*a*b*(p + 1)), Int[
(c*x)^(m - 1)*(a + b*x^2)^(p + 1)*ExpandToSum[2*a*b*(p + 1)*x*Q - a*g*m + b*f*(m + 2*p + 3)*x, x], x], x]] /;
FreeQ[{a, b, c}, x] && PolyQ[Pq, x] && LtQ[p, -1] && GtQ[m, 0]

Rule 1810

Int[(Pq_)*((a_) + (b_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[Pq*(a + b*x^2)^p, x], x] /; FreeQ[{a,
b}, x] && PolyQ[Pq, x] && IGtQ[p, -2]

Rubi steps

\begin {align*} \int \frac {x \left (A+B x+C x^2+D x^3\right )}{\left (a+b x^2\right )^2} \, dx &=-\frac {x \left (a \left (B-\frac {a D}{b}\right )-(A b-a C) x\right )}{2 a b \left (a+b x^2\right )}-\frac {\int \frac {-a \left (B-\frac {a D}{b}\right )-2 a C x-2 a D x^2}{a+b x^2} \, dx}{2 a b}\\ &=-\frac {x \left (a \left (B-\frac {a D}{b}\right )-(A b-a C) x\right )}{2 a b \left (a+b x^2\right )}-\frac {\int \left (-\frac {2 a D}{b}-\frac {a (b B-3 a D)+2 a b C x}{b \left (a+b x^2\right )}\right ) \, dx}{2 a b}\\ &=\frac {D x}{b^2}-\frac {x \left (a \left (B-\frac {a D}{b}\right )-(A b-a C) x\right )}{2 a b \left (a+b x^2\right )}+\frac {\int \frac {a (b B-3 a D)+2 a b C x}{a+b x^2} \, dx}{2 a b^2}\\ &=\frac {D x}{b^2}-\frac {x \left (a \left (B-\frac {a D}{b}\right )-(A b-a C) x\right )}{2 a b \left (a+b x^2\right )}+\frac {C \int \frac {x}{a+b x^2} \, dx}{b}+\frac {(b B-3 a D) \int \frac {1}{a+b x^2} \, dx}{2 b^2}\\ &=\frac {D x}{b^2}-\frac {x \left (a \left (B-\frac {a D}{b}\right )-(A b-a C) x\right )}{2 a b \left (a+b x^2\right )}+\frac {(b B-3 a D) \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{2 \sqrt {a} b^{5/2}}+\frac {C \log \left (a+b x^2\right )}{2 b^2}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.05, size = 92, normalized size = 0.91 \begin {gather*} \frac {a C+a D x-A b-b B x}{2 b^2 \left (a+b x^2\right )}-\frac {(3 a D-b B) \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{2 \sqrt {a} b^{5/2}}+\frac {C \log \left (a+b x^2\right )}{2 b^2}+\frac {D x}{b^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(x*(A + B*x + C*x^2 + D*x^3))/(a + b*x^2)^2,x]

[Out]

(D*x)/b^2 + (-(A*b) + a*C - b*B*x + a*D*x)/(2*b^2*(a + b*x^2)) - ((-(b*B) + 3*a*D)*ArcTan[(Sqrt[b]*x)/Sqrt[a]]
)/(2*Sqrt[a]*b^(5/2)) + (C*Log[a + b*x^2])/(2*b^2)

________________________________________________________________________________________

IntegrateAlgebraic [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {x \left (A+B x+C x^2+D x^3\right )}{\left (a+b x^2\right )^2} \, dx \end {gather*}

Verification is not applicable to the result.

[In]

IntegrateAlgebraic[(x*(A + B*x + C*x^2 + D*x^3))/(a + b*x^2)^2,x]

[Out]

IntegrateAlgebraic[(x*(A + B*x + C*x^2 + D*x^3))/(a + b*x^2)^2, x]

________________________________________________________________________________________

fricas [A]  time = 0.81, size = 287, normalized size = 2.84 \begin {gather*} \left [\frac {4 \, D a b^{2} x^{3} + 2 \, C a^{2} b - 2 \, A a b^{2} - {\left (3 \, D a^{2} - B a b + {\left (3 \, D a b - B b^{2}\right )} x^{2}\right )} \sqrt {-a b} \log \left (\frac {b x^{2} + 2 \, \sqrt {-a b} x - a}{b x^{2} + a}\right ) + 2 \, {\left (3 \, D a^{2} b - B a b^{2}\right )} x + 2 \, {\left (C a b^{2} x^{2} + C a^{2} b\right )} \log \left (b x^{2} + a\right )}{4 \, {\left (a b^{4} x^{2} + a^{2} b^{3}\right )}}, \frac {2 \, D a b^{2} x^{3} + C a^{2} b - A a b^{2} - {\left (3 \, D a^{2} - B a b + {\left (3 \, D a b - B b^{2}\right )} x^{2}\right )} \sqrt {a b} \arctan \left (\frac {\sqrt {a b} x}{a}\right ) + {\left (3 \, D a^{2} b - B a b^{2}\right )} x + {\left (C a b^{2} x^{2} + C a^{2} b\right )} \log \left (b x^{2} + a\right )}{2 \, {\left (a b^{4} x^{2} + a^{2} b^{3}\right )}}\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(D*x^3+C*x^2+B*x+A)/(b*x^2+a)^2,x, algorithm="fricas")

[Out]

[1/4*(4*D*a*b^2*x^3 + 2*C*a^2*b - 2*A*a*b^2 - (3*D*a^2 - B*a*b + (3*D*a*b - B*b^2)*x^2)*sqrt(-a*b)*log((b*x^2
+ 2*sqrt(-a*b)*x - a)/(b*x^2 + a)) + 2*(3*D*a^2*b - B*a*b^2)*x + 2*(C*a*b^2*x^2 + C*a^2*b)*log(b*x^2 + a))/(a*
b^4*x^2 + a^2*b^3), 1/2*(2*D*a*b^2*x^3 + C*a^2*b - A*a*b^2 - (3*D*a^2 - B*a*b + (3*D*a*b - B*b^2)*x^2)*sqrt(a*
b)*arctan(sqrt(a*b)*x/a) + (3*D*a^2*b - B*a*b^2)*x + (C*a*b^2*x^2 + C*a^2*b)*log(b*x^2 + a))/(a*b^4*x^2 + a^2*
b^3)]

________________________________________________________________________________________

giac [A]  time = 0.43, size = 81, normalized size = 0.80 \begin {gather*} \frac {D x}{b^{2}} + \frac {C \log \left (b x^{2} + a\right )}{2 \, b^{2}} - \frac {{\left (3 \, D a - B b\right )} \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{2 \, \sqrt {a b} b^{2}} + \frac {C a - A b + {\left (D a - B b\right )} x}{2 \, {\left (b x^{2} + a\right )} b^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(D*x^3+C*x^2+B*x+A)/(b*x^2+a)^2,x, algorithm="giac")

[Out]

D*x/b^2 + 1/2*C*log(b*x^2 + a)/b^2 - 1/2*(3*D*a - B*b)*arctan(b*x/sqrt(a*b))/(sqrt(a*b)*b^2) + 1/2*(C*a - A*b
+ (D*a - B*b)*x)/((b*x^2 + a)*b^2)

________________________________________________________________________________________

maple [A]  time = 0.01, size = 127, normalized size = 1.26 \begin {gather*} -\frac {B x}{2 \left (b \,x^{2}+a \right ) b}+\frac {B \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{2 \sqrt {a b}\, b}+\frac {D a x}{2 \left (b \,x^{2}+a \right ) b^{2}}-\frac {3 D a \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{2 \sqrt {a b}\, b^{2}}-\frac {A}{2 \left (b \,x^{2}+a \right ) b}+\frac {C a}{2 \left (b \,x^{2}+a \right ) b^{2}}+\frac {C \ln \left (b \,x^{2}+a \right )}{2 b^{2}}+\frac {D x}{b^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*(D*x^3+C*x^2+B*x+A)/(b*x^2+a)^2,x)

[Out]

D*x/b^2-1/2/b/(b*x^2+a)*B*x+1/2/b^2/(b*x^2+a)*a*D*x-1/2/b/(b*x^2+a)*A+1/2/b^2/(b*x^2+a)*a*C+1/2*C*ln(b*x^2+a)/
b^2+1/2/b/(a*b)^(1/2)*arctan(1/(a*b)^(1/2)*b*x)*B-3/2/b^2/(a*b)^(1/2)*arctan(1/(a*b)^(1/2)*b*x)*a*D

________________________________________________________________________________________

maxima [A]  time = 3.02, size = 84, normalized size = 0.83 \begin {gather*} \frac {C a - A b + {\left (D a - B b\right )} x}{2 \, {\left (b^{3} x^{2} + a b^{2}\right )}} + \frac {D x}{b^{2}} + \frac {C \log \left (b x^{2} + a\right )}{2 \, b^{2}} - \frac {{\left (3 \, D a - B b\right )} \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{2 \, \sqrt {a b} b^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(D*x^3+C*x^2+B*x+A)/(b*x^2+a)^2,x, algorithm="maxima")

[Out]

1/2*(C*a - A*b + (D*a - B*b)*x)/(b^3*x^2 + a*b^2) + D*x/b^2 + 1/2*C*log(b*x^2 + a)/b^2 - 1/2*(3*D*a - B*b)*arc
tan(b*x/sqrt(a*b))/(sqrt(a*b)*b^2)

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {x\,\left (A+B\,x+C\,x^2+x^3\,D\right )}{{\left (b\,x^2+a\right )}^2} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x*(A + B*x + C*x^2 + x^3*D))/(a + b*x^2)^2,x)

[Out]

int((x*(A + B*x + C*x^2 + x^3*D))/(a + b*x^2)^2, x)

________________________________________________________________________________________

sympy [B]  time = 5.76, size = 212, normalized size = 2.10 \begin {gather*} \frac {D x}{b^{2}} + \left (\frac {C}{2 b^{2}} - \frac {\sqrt {- a b^{5}} \left (- B b + 3 D a\right )}{4 a b^{5}}\right ) \log {\left (x + \frac {2 C a - 4 a b^{2} \left (\frac {C}{2 b^{2}} - \frac {\sqrt {- a b^{5}} \left (- B b + 3 D a\right )}{4 a b^{5}}\right )}{- B b + 3 D a} \right )} + \left (\frac {C}{2 b^{2}} + \frac {\sqrt {- a b^{5}} \left (- B b + 3 D a\right )}{4 a b^{5}}\right ) \log {\left (x + \frac {2 C a - 4 a b^{2} \left (\frac {C}{2 b^{2}} + \frac {\sqrt {- a b^{5}} \left (- B b + 3 D a\right )}{4 a b^{5}}\right )}{- B b + 3 D a} \right )} + \frac {- A b + C a + x \left (- B b + D a\right )}{2 a b^{2} + 2 b^{3} x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(D*x**3+C*x**2+B*x+A)/(b*x**2+a)**2,x)

[Out]

D*x/b**2 + (C/(2*b**2) - sqrt(-a*b**5)*(-B*b + 3*D*a)/(4*a*b**5))*log(x + (2*C*a - 4*a*b**2*(C/(2*b**2) - sqrt
(-a*b**5)*(-B*b + 3*D*a)/(4*a*b**5)))/(-B*b + 3*D*a)) + (C/(2*b**2) + sqrt(-a*b**5)*(-B*b + 3*D*a)/(4*a*b**5))
*log(x + (2*C*a - 4*a*b**2*(C/(2*b**2) + sqrt(-a*b**5)*(-B*b + 3*D*a)/(4*a*b**5)))/(-B*b + 3*D*a)) + (-A*b + C
*a + x*(-B*b + D*a))/(2*a*b**2 + 2*b**3*x**2)

________________________________________________________________________________________